package com.virus.mall.model.vo;

import com.virus.mall.utils.PropertiesUtils;

/**
 * @Classname GoodsGetVo
 * @Description GoodsGetInfo中goods的Vo
 * @Date 2021/4/18 10:43
 * @Created by virus
 */
public class GoodsGetVo {

    private String domain = PropertiesUtils.DOMAIN;

    private Integer id;

    private String img;

    private String name;

    private String desc;

    private Integer typeId;

    private Double unitPrice;

    private boolean hasDomain = true;

    public GoodsGetVo() {
    }

    public GoodsGetVo(Integer id, String img, String name, String desc, Integer typeId, Double unitPrice) {
        this.id = id;
        this.img = img;
        this.name = name;
        this.desc = desc;
        this.typeId = typeId;
        this.unitPrice = unitPrice;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getImg() {
        if (hasDomain) {
            return domain + "/" + img;
        }
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public Integer getTypeId() {
        return typeId;
    }

    public void setTypeId(Integer typeId) {
        this.typeId = typeId;
    }

    public Double getUnitPrice() {
        return unitPrice;
    }

    public void setUnitPrice(Double unitPrice) {
        this.unitPrice = unitPrice;
    }

    public void setHasDomain(boolean hasDomain) {
        this.hasDomain = hasDomain;
    }
}
